<!-- 外部登录 -->
<template>
    <div class="single-login">
        <i class="el-icon-loading"></i>
    </div>
</template>

<script>
import user from '@/js/util/user.js';
import bus from '@/js/event/bus.js';

export default {
    created() {
        user.setToken('dtscharts');
        user.setUploadToken('dtscharts_upload');
        user.setPanel(true);
        if (this.$route.query && this.$route.query.id) {
            bus.initExporePlayer({ id: this.$route.query.id, layout: this.$route.query.layout ? this.$route.query.layout : '1' });
        } else {
            bus.initExporePlayer();
        }
        document.oncontextmenu = function(){return false}
    },
    methods: {
        getUrlParam(name) {
            let url = window.location.href;
            let query = url.split("?")[1];
            if (query) {
                let vars = query.split("&");
                for (let i=0;i<vars.length;i++) {
                    let pair = vars[i].split("=");
                    if(pair[0] == name) return pair[1];
                }
            }
            return(false);
        }
    }
};
</script>
<style lang='scss' scoped>
.single-login {
    height: 100vh;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
}
</style>
